package com.xo.mall.controller.pms;

import com.xo.common.Result.ResultResponse;
import com.xo.common.pojo.dto.req.EsSearchReqDto;
import com.xo.mall.server.PmsSearchService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mall/pms")
@Slf4j
public class PmsSearchController {

    @Resource
    private PmsSearchService pmsSearchService;

    @PostMapping("/esSearch")
    @Operation(summary = "es搜索商品", description = "es搜索商品")
    public ResultResponse<Object> esSearch(@RequestBody EsSearchReqDto esSearchReqDto) {
        return pmsSearchService.esSearch(esSearchReqDto);
    }

}
